package jdesktop.appbar;

/**
 * Defines an extent, which is an integer range.
 *
 */
public class Extent
{
    private int start;
    private int finish;

    public Extent()
    {
    }

    public Extent(int start, int finish)
    {
        this.start = start;
        this.finish = finish;
    }

    public int getStart()
    {
        return start;
    }

    public void setStart(int start)
    {
        this.start = start;
    }

    public int getFinish()
    {
        return finish;
    }

    public void setFinish(int finish)
    {
        this.finish = finish;
    }

    /**
     * retrieves the size of this extent. The size is defined by {@code getFinish()-getStart()}.
     * @return The size of this extent.
     */
    public int getSize()
    {
        return finish-start;
    }

}
